import { Injectable } from '@angular/core';
import { SessionStorageService } from '../shared/storage/session-storage.service';
/*
* 配置服务
*/
@Injectable()
export class ConfigProvider {
    private static sessionStorageService = new SessionStorageService();

    private static HongDao_AppKey = '2b966fb5a304';
    private static HongDao_AppSecret = '496bd78cead1a09d578e5e430ada63fc';

    public static get AppKey() {
        const appInfo = JSON.parse(this.sessionStorageService.get('AppInfo'));
        return appInfo && appInfo.appKey ? appInfo.appKey : this.HongDao_AppKey;
    }

    public static get AppSecret() {
        const appInfo = JSON.parse(this.sessionStorageService.get('AppInfo'));
        return appInfo && appInfo.appKey ? appInfo.appSecret : this.HongDao_AppSecret;
    }

    public static passportBaseURL = 'http://localhost:9021/';
    public static apiBaseURL = 'http://localhost:9021/';


}
